package com.fzshang.api.controller;

import cn.hutool.core.date.DateUtil;

import java.util.Date;
import java.util.Random;

/**
 * @AUTHOR 冯政尚
 * @DATE 2020/2/14 11:47
 * @DAY_NAME_FULL: 星期五
 */
public class Ceshi {


    public static String randomUser(){
        Date date = DateUtil.date();
        String format = DateUtil.format(date, "yyyyMMdd");
        String a = "WX";
        String  c = System.currentTimeMillis()+"";
        //生成两位数的随机数
        Random random = new Random();
        int ends = random.nextInt(99);
        String d = String.format("%02d",ends);
        //随机字母
        char e =(char)(int)(Math.random()*26+97);
        char f =(char)(int)(Math.random()*26+97);

        System.out.println("格式:"+a+format+c+d+e+f);
        return a+format+c+d+e+f;
    }


    public static void main(String[] args) {
       randomUser();
    }


}
